import requests

class Sdk:

    user_agent = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}
    def handle_get(self, url, params=None):
        res = requests.get(url, params, headers=self.user_agent)
        return res

if __name__ == '__main__':
    url = 'https://movie.douban.com/j/search_subjects'
    query_param = {
        "type": "movie",
        "tag": "最新",
        "page_limit": 50,
        "page_start": 0
    }
    sdk = Sdk()
    r = sdk.handle_get(url, params=query_param)
    print(r.status_code)
    print(r.json())

    assert r.status_code == 200
    assert len(r.json()['subjects']) == 50